|
 |
Ken wrote:
> One question does arise is how much does a random number do in
> a static equation. If you were running it through a loop I could
> understand using it but I see no real advantage to it the way
> that Ken illustrated it.
>
The example I gave was just for simplicity. Not particularly useful. What
I'm really using it in is an attempt at a rock wall. I looked at David
Wilkinson's "Wot no superellipsoids?" brick wall and played with that a
bit, but I want to make a rock wall with more random shapes and positions.
What I've got so far is:
#declare f1 = function {
z^8 + //bounds the brick depth
(cos(y))^8 + //repeating across +/- y
(cos((x + ( //repeating across +/- x
2 * pi * noise3d(0, floor(y / pi), 0) //each row gets shifted randomly
))/2))^30 -
0.9 //leave room for mortar
}
Using noise3d, the shifts between rows tend to form up in patterns,
gradually shifting one direction, then back the other. I'd rather have
those shifts be completely random. Based on Chris Huff's explanation, it
sounds like rand() won't do this for me since it will only be calculated
onec for the whole function. So I'll have to play with exagerating the
shifts produced by noise3d(), or come up with some other pseudo-random
effect that I can generate on my own.
Ken
Post a reply to this message
|
 |